import java.awt.Image;
import java.awt.geom.AffineTransform;
import java.awt.image.AffineTransformOp;
import java.awt.image.BufferedImage;


public class Drawable {

	Point point;
	BufferedImage img;
	float angle;
	Point center;
	int extra;
	/**
	 * The user defines every aspect of the drawable object but the extra variable,
	 * which is optional
	 * @param point the position where the image should be drawn
	 * @param img the image to be drawn
	 * @param angle the angle the image should be rotated to
	 * @param center the center of the image
	 */
	public Drawable(Point point, BufferedImage img,float angle, Point center)
	{
		this.point = point;
		this.img = img;
		this.angle = angle;
		this.center = center;
		extra = 0;
	}
	/**
	 * this constructor doesn't need the center input, it just finds the mathematical
	 * center of the image and assumes that that is the correct center
	 * @param point the position where the image should be drawn
	 * @param img the image to be drawn
	 * @param angle the angle the image should be rotated to
	 * @param center the center of the image
	 */
	public Drawable(Point point, BufferedImage img,float angle)
	{
		this.point = point;
		this.img = img;
		this.angle = angle;
		this.center = new Point(img.getWidth()/2,img.getHeight()/2);
	}
	/**
	 * gets the angle the image should be rotated to
	 * @return angle
	 */
	public float getAngle()
	{
		return angle;
	}
	/**
	 * gets the image that should be displayed
	 * @return img
	 */
	public BufferedImage getImage()
	{
		return img;
	}
	/**
	 * gets where this image should be displayed in respect
	 * to the map as a whole, not just the screen position
	 * @return point
	 */
	public Point getPoint()
	{
		return point;
	}
	/**
	 * gets the height of the image
	 * @return height
	 */
	public int getHeight()
	{
		return img.getHeight();
	}
	/**
	 * gets the width of the image
	 * @return width
	 */
	public int getWidth()
	{
		return img.getWidth();
	}
	/**
	 * gets the center of the image
	 * @return center
	 */
	public Point getCenter()
	{
		return center;
	}
	/**
	 * sets the extra variable for this object
	 * @param extra
	 */
	public void setExtra(int extra)
	{
		this.extra = extra;
	}
	/**
	 * gets whatever extra value the programmer decided to assign this
	 * object
	 */
	public int getExtra()
	{
		return extra;
	}
}
